﻿var locked = 0;
function relatedComponent(compId) {
    switch (compId) {
        case 1:
            return document.getElementById('<%= status1.ClientID %>');
            break;
        case 2:
            return document.getElementById('<%= status2.ClientID %>');
            break;
        case 3:
            return document.getElementById('<%= status3.ClientID %>');
            break;
        case 4:
            return document.getElementById('<%= status4.ClientID %>');
            break;
        case 5:
            return document.getElementById('<%= status5.ClientID %>');
            break;
        case 6:
            return document.getElementById('<%= status6.ClientID %>');
            break;
        case 7:
            return document.getElementById('<%= status7.ClientID %>');
            break;
        case 8:
            return document.getElementById('<%= status8.ClientID %>');
            break;
    }
}
function Hide(compId) {
    var elem = relatedComponent(compId);
    if (locked != compId)
        elem.style.display = "none";
}
function HideAndUnlock(compId) {
    var elem = relatedComponent(compId);
    elem.style.display = "none";
    locked = compId;
}
function Show(compId) {
    locked = 0;
    for (var i = 1; i < 9; i++) {
        Hide(i);
    }
    var elem = relatedComponent(compId);
    elem.style.display = "";
}
function ShowAndLock(compId) {
    locked = compId;
    for (var i = 1; i < 9; i++) {
        Hide(i);
    }
    var elem = relatedComponent(compId);
    elem.style.display = "";
}